<template>
    <!--1,底图切换控件  -->
    <div>
      <img class="layer" src="@/images/vector.jpg" alt="" @click="handleClick('TDTVector')">
      <img class="layer" src="@/images/image.jpg" alt="" @click="handleClick('TDTImage')">
    </div>
</template>
  
<script setup>
const EmitLayer = defineEmits(["changeLayer"])//这样就调用到父组件的方法了
 
const handleClick = (layer)=>{
  EmitLayer('changeLayer',layer)
}
</script>
  
<style>
  .layer{
    position: fixed;
    bottom:2vh;
    right:1vw;
    width:10vw;
    z-index:999;
    border:2px solid rgba(255,255,255,0.5);
    border-radius:3px;
  }
  .layer:first-child{
    right:12vw
  }
  
</style>